import request from "@/utils/request";


let cacheContainerStatusList = []

export default {
  name: 'ContainerStatusMixin',
  computed: {
  },
  data(){
    return {
      allContainerStatusList: [],
    }
  },
  created() {
    this.getAllContainerStatus()
  },
  methods: {
    getAllContainerStatus() {
      if(cacheContainerStatusList.length > 0){
        this.allContainerStatusList = cacheContainerStatusList
      }else{
        request({
          url: '/container/getContainerAllStatus',
        })
          .then(res=>{
            this.allContainerStatusList = res.data
            cacheContainerStatusList = res.data
          })
      }

    },
  },
}
